
package com.insigma.business.qrcode.soldier.service.impl;


import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.soldier.dao.SoldierBasicImportDao;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import com.insigma.business.qrcode.soldier.entity.SoldierBasicImportDO;
import com.insigma.business.qrcode.soldier.request.SoldierBasicImportBSearcher;
import com.insigma.business.qrcode.soldier.service.SoldierBasicImportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("soldierBasicImportService")
public class SoldierBasicImportServiceImpl implements SoldierBasicImportService {

    @Autowired(required = false)
    private SoldierBasicImportDao soldierBasicImportDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<SoldierBasicImportDO> search(final SoldierBasicImportBSearcher soldierBasicImportBSearcher) {
        return soldierBasicImportDao.search(soldierBasicImportBSearcher);
    }

   
    @Override
    public SoldierBasicImportDO get(final String id){
        return soldierBasicImportDao.get(id);
    }

    
    @Override
    public Integer insert(final SoldierBasicImportDO soldierBasicImportDO){
        soldierBasicImportDO.setId(sequenceGenerator.genKey(SequenceNameConstant.SOLDIER_BASIC_IMPORT_ID));
        return soldierBasicImportDao.insert(soldierBasicImportDO);
    }

    
    @Override
    public Integer update(final SoldierBasicImportDO soldierBasicImportDO){
        return soldierBasicImportDao.update(soldierBasicImportDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return soldierBasicImportDao.delete(id,modifierType,modifierId);
    }

    @Override
    public List<SoldierBasicImportDO> listAllSoldierNotInBasic() {

        return soldierBasicImportDao.listAllSoldierNotInBasic();
    }

}
